<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::get('/',array('as'=>'home','before'=>'auth','uses'=>'HomeController@index'));
Route::group(array('prefix'=>'login'),function(){
	Route::get('/',array('as'=>'login.index','uses'=>'LoginController@index'));//登陆页面
	Route::post('auth',array('as'=>'login.auth','uses'=>'LoginController@auth'));//验证逻辑
	Route::get('logout',array('as'=>'login.logout','uses'=>'LoginController@logout'));//登出
});
// 计划
Route::group(array('prefix'=>'plane','before'=>'auth'),function(){
	Route::get('/',array('as'=>'plane.index','uses'=>'PlaneController@index'));
	Route::get('add',array('as'=>'plane.add','uses'=>'PlaneController@add'));
	Route::post('store',array('as'=>'plane.store','uses'=>'PlaneController@store'));
	Route::get('history',array('as'=>'plane.history','uses'=>'PlaneController@add'));
});
// 用户
Route::group(array('prefix'=>'users','before'=>'auth'),function(){
	Route::get('/',array('as'=>'users.index','uses'=>'UsersController@index'));
	Route::get('add',array('as'=>'users.add','uses'=>'UsersController@add'));
	Route::get('profile',array('as'=>'users.profile','uses'=>'UsersController@add'));
});